<div class="order_box">
<h3>收货人信息</h3>
<div class="shr_info">
<!--{if $opertype == "use"}-->
<p class="addp">
	<a href="javascript:void(0)" onclick="Buy.edit('<!--{$address.addressid}-->');return false;">修改</a>
</p>
<div class="addressinfo2">
	<p><!--{$address.receiver}--></p>
	<p><!--{getDistrict($address.province,$address.city,$address.district)}--><!--{$address.address}--> <!--{$address.zipcode}--></p>
	<p><!--{$address.link}--></p>
</div>
<input type="hidden" value="<!--{$address.addressid}-->" name="addressid" id="addressid"/>
</div>
</div>
<!--送货方式-->
<div class="order_box">
	<div class="o_l_right"></div>
	<h3>配送方式</h3>
	<div class="shr_info">
		<!--{if $waylist}-->
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tbody>
				<!--{foreach $waylist way}-->
				<tr height="60">
					<td width="30%">
						<input type="radio" value="<!--{$way.wayid}-->" name="wayid" onclick="Buy.checkway('<!--{$way.wayid}-->')"/><!--{$way.name}-->
					</td>
					<td>
						<span id="price_<!--{$way.wayid}-->"><!--{getPrice($way.price)}--> 元</span>
					</td>
					<td width="60%">
						<!--{$way.desc}-->
					</td>
				</tr>
				<!--{/foreach}-->
			</tbody>
		</table>
		<!--{/if}-->
	</div>
	<div class="stime">
		送货时间：
		<select name="posttype">
			<option value="1">工作日、双休日与假日均可送货</option>
			<option value="2">只有双休日、假日送货</option>
			<option value="3">只有工作日送货</option>
		</select>
	</div>
</div>
<!--送货方式-->
<!--{elseif ($opertype == "add") || ($opertype =="edit")}-->
<!--{if $addresslist}-->
<table class="addressinfo" width="100%" border="0" cellspacing="0" cellpadding="0">
	<tbody>
		<!--{foreach $addresslist address}-->
		<tr id="tr_<!--{$address.addressid}-->">
			<td>
				<input type="radio" value="<!--{$address.addressid}-->" name="addressid" id="addressid_<!--{$address.addressid}-->" onclick="Buy.clickone()"
					<!--{if $opertype =='edit' && $addressid == $address['addressid']}-->checked<!--{/if}-->
				/>
				<label for="addressid_<!--{$address.addressid}-->"><!--{$address.receiver}--></label>
			</td>
			<td>
				<!--{getDistrict($address.province,$address.city,$address.district)}--><!--{$address.address}-->
			</td>
			<td>
				<!--{$address.zipcode}-->
			</td>
			<td>
				<!--{$address.link}-->
			</td>
			<td>
				<a href="javascript:void(0)" onclick="Buy.edit('<!--{$address.addressid}-->');return false;">编辑</a>
				<a href="javascript:void(0)" onclick="Buy.del('<!--{$address.addressid}-->');return false;">删除</a>
			</td>
		</tr>
		<!--{/foreach}-->
	</tbody>
</table>
<!--{/if}-->
<p class="addp">
		<input type="radio" value="0" name="addressid" id="addressid_0" <!--{if $opertype=='add'}-->checked<!--{/if}--> onclick="Buy.add()"/> 
		添加新地址
</p>
<div id="newtb">
	<ul>
		<!--{if $opertype =="add"}-->
		<li>
			<label><em>*</em>收货人姓名：</label>
			<p>
				<input type="text" value="" name="receiver" id="receiver" onfocus="Buy.focusobj(this)"/>
			</p>
		</li>
		<li>
			<label><em>*</em>地区：</label>
			<p>
				<script src="template/jslib/country/country.js" type="text/javascript"></script>
				<select name="province" id="province" onchange="$.country.getCity()" onfocus="Buy.focusobj(this)">
				</select>
				-
				<select name="city" id="city" onchange="$.country.getDistrict()" onfocus="Buy.focusobj(this)">
				</select>
				-
				<select name="district" id="district" onchange="$.country.getZip()" onfocus="Buy.focusobj(this)">
				</select>
			</p>
		</li>
		<li>
			<label><em>*</em>详细地址：</label>
			<p>
				<input type="text" value="" name="address" id="address" size="40" onfocus="Buy.focusobj(this)"/>
			</p>
		</li>
		<li>
			<label><em>*</em>邮编：</label>
			<p>
				<input type="text" value="" name="zipcode" id="zipcode" onfocus="Buy.focusobj(this)"/>
				<script type="text/javascript">
					$.country.init(true);
				</script>
			</p>
		</li>
		<li>
			<label><em>*</em>电话/手机：</label>
			<p>
				<input type="text" value="" name="link" id="link" onfocus="Buy.focusobj(this)"/>
			</p>
		</li>
		<!--{elseif $opertype == "edit"}-->
		<li>
			<label><em>*</em>收货人姓名：</label>
			<p>
				<input type="text" value="<!--{$uaddress.receiver}-->" name="receiver" id="receiver" onfocus="Buy.focusobj(this)"/>
			</p>
		</li>
		<li>
			<label><em>*</em>地区：</label>
			<p>
				<script src="template/jslib/country/country.js" type="text/javascript"></script>
				<select name="province" id="province" onchange="$.country.getCity()" onfocus="Buy.focusobj(this)">
					<!--{$provinceopt}-->
				</select>
				-
				<select name="city" id="city" onchange="$.country.getDistrict()" onfocus="Buy.focusobj(this)">
					<!--{$cityopt}-->
				</select>
				-
				<select name="district" id="district" onfocus="Buy.focusobj(this)" onchange="$.country.getZip()">
					<!--{$districtopt}-->
				</select>
			</p>
		</li>
		<li>
			<label><em>*</em>详细地址：</label>
			<p>
				<input type="text" value="<!--{$uaddress.address}-->" name="address" id="address" size="40" onfocus="Buy.focusobj(this)"/>
				<script type="text/javascript">
					$.country.init(false);
				</script>
			</p>
		</li>
		<li>
			<label><em>*</em>邮编：</label>
			<p>
				<input type="text" value="<!--{$uaddress.zipcode}-->" name="zipcode" id="zipcode" onfocus="Buy.focusobj(this)"/>
			</p>
		</li>
		<li>
			<label><em>*</em>电话/手机：</label>
			<p>
				<input type="text" value="<!--{$address.link}-->" name="link" id="link" onfocus="Buy.focusobj(this)"/>
			</p>
		</li>
		<!--{/if}-->
	</ul>
</div>
<p class="addp">
	<input type="button" value="保存并使用这个地址" name="" onclick="Buy.saveAndUse('<!--{def($addressid,0)}-->')"  id="foradd"/>
</p>
<p class="addp">
	<input type="button" value="使用这个地址" name="" onclick="Buy.use()" id="foruse" class="none"/>
</p>
</div>
</div>
<!--送货方式-->
<div class="order_box">
	<div class="o_l_right"></div>
	<h3>送货方式</h3>
	<div class="shr_info">
		<p>请首先选择收货地址</p>
		<input type="hidden" value="0" name="wayid"/>
	</div>
</div>
<!--送货方式-->
<!--{elseif $opertype == "get"}-->
<!--{if $addresslist}-->
<table class="addressinfo" width="100%" border="0" cellspacing="0" cellpadding="0">
	<tbody>
		<!--{foreach $addresslist address}-->
		<tr id="tr_<!--{$address.addressid}-->">
			<td>
				<input type="radio" value="<!--{$address.addressid}-->" name="addressid" id="addressid_<!--{$address.addressid}-->"
				<!--{if $addressid == $address[addressid]}-->checked<!--{/if}-->/>
				<label for="addressid_<!--{$address.addressid}-->"><!--{$address.receiver}--></label>
			</td>
			<td>
				<!--{getDistrict($address.province,$address.city,$address.district)}--><!--{$address.address}-->
			</td>
			<td>
				<!--{$address.zipcode}-->
			</td>
			<td>
				<!--{$address.link}-->
			</td>
			<td>
				<a href="javascript:void(0)" onclick="Buy.edit('<!--{$address.addressid}-->');return false;">编辑</a>
				<a href="javascript:void(0)" onclick="Buy.del('<!--{$address.addressid}-->');return false;">删除</a>
			</td>
		</tr>
		<!--{/foreach}-->
	</tbody>
</table>
<!--{/if}-->
<p class="addp">
	<input type="radio" value="0" name="addressid" id="addressid_0" onclick="Buy.add()"/> 添加新地址
</p>
<p class="addp">
	<input type="button" value="使用这个地址" name="" onclick="Buy.use()" id="foruse"/>
</p>
</div>
</div>
<!--送货方式-->
<div class="order_box">
	<div class="o_l_right"></div>
	<h3>送货方式</h3>
	<div class="shr_info">
		<p>请首先选择收货地址</p>
		<input type="hidden" value="0" name="wayid"/>
	</div>
</div>
<!--送货方式-->
<!--{/if}-->

